<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>删除元素节点</title>
	<script>
        window.onload = function () {
          const oList = document.getElementById('list');
          const oBtn = document.getElementById('btn');
          oBtn.onclick = function () {
                oList.removeChild(oList.lastElementChild);
            }
        }
	</script>
</head>
<body>
<ul id="list">
	<li>html</li>
	<li>css</li>
	<li>javascript</li>
	<li>learn</li>
</ul>
<input id="btn" type="button" value="删除">
</body>
</html>